Integrand size = 23, antiderivative size = 135 \[ \int \frac {(a+a \cos (c+d x))^2}{\sqrt {\sec (c+d x)}} \, dx=\frac {16 a^2 \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {4 a^2 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 a^2 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3317, 3873, 3854, 3856, 2720, 4130, 2719} \[ \int \frac {(a+a \cos (c+d x))^2}{\sqrt {\sec (c+d x)}} \, dx=\frac {2 a^2 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {4 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {16 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 3317
Rule 3854
Rule 3856
Rule 3873
Rule 4130
Rubi steps \begin{align*} \text {integral}& = \int \frac {(a+a \sec (c+d x))^2}{\sec ^{\frac {5}{2}}(c+d x)} \, dx \\ & = \left (2 a^2\right ) \int \frac {1}{\sec ^{\frac {3}{2}}(c+d x)} \, dx+\int \frac {a^2+a^2 \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x)} \, dx \\ & = \frac {2 a^2 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {1}{3} \left (2 a^2\right ) \int \sqrt {\sec (c+d x)} \, dx+\frac {1}{5} \left (8 a^2\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx \\ & = \frac {2 a^2 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {1}{3} \left (2 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx+\frac {1}{5} \left (8 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx \\ & = \frac {16 a^2 \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {4 a^2 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 a^2 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 1.46 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.01 \[ \int \frac {(a+a \cos (c+d x))^2}{\sqrt {\sec (c+d x)}} \, dx=\frac {a^2 \left (-96 i+\frac {192 i \operatorname {Hypergeometric2F1}\left (-\frac {1}{4},\frac {1}{2},\frac {3}{4},-e^{2 i (c+d x)}\right )}{\sqrt {1+e^{2 i (c+d x)}}}-40 i \sqrt {1+e^{2 i (c+d x)}} \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {5}{4},-e^{2 i (c+d x)}\right ) \sec (c+d x)+40 \sin (c+d x)+6 \sin (2 (c+d x))\right )}{30 d \sqrt {\sec (c+d x)}} \]
[In]
[Out]
Time = 8.36 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.85
method | result | size |
default | \(-\frac {4 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, a^{2} \left (-12 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+32 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-13 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+5 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-12 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{15 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(250\) |
parts | \(\frac {2 a^{2} \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}-\frac {2 a^{2} \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-8 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-3 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{5 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}-\frac {4 a^{2} \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (4 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{3 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(522\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.09 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.16 \[ \int \frac {(a+a \cos (c+d x))^2}{\sqrt {\sec (c+d x)}} \, dx=-\frac {2 \, {\left (5 i \, \sqrt {2} a^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 5 i \, \sqrt {2} a^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 12 i \, \sqrt {2} a^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 12 i \, \sqrt {2} a^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - \frac {{\left (3 \, a^{2} \cos \left (d x + c\right )^{2} + 10 \, a^{2} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}\right )}}{15 \, d} \]
[In]
[Out]
\[ \int \frac {(a+a \cos (c+d x))^2}{\sqrt {\sec (c+d x)}} \, dx=a^{2} \left (\int \frac {2 \cos {\left (c + d x \right )}}{\sqrt {\sec {\left (c + d x \right )}}}\, dx + \int \frac {\cos ^{2}{\left (c + d x \right )}}{\sqrt {\sec {\left (c + d x \right )}}}\, dx + \int \frac {1}{\sqrt {\sec {\left (c + d x \right )}}}\, dx\right ) \]
[In]
[Out]
\[ \int \frac {(a+a \cos (c+d x))^2}{\sqrt {\sec (c+d x)}} \, dx=\int { \frac {{\left (a \cos \left (d x + c\right ) + a\right )}^{2}}{\sqrt {\sec \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+a \cos (c+d x))^2}{\sqrt {\sec (c+d x)}} \, dx=\int { \frac {{\left (a \cos \left (d x + c\right ) + a\right )}^{2}}{\sqrt {\sec \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(a+a \cos (c+d x))^2}{\sqrt {\sec (c+d x)}} \, dx=\int \frac {{\left (a+a\,\cos \left (c+d\,x\right )\right )}^2}{\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \]
[In]
[Out]